package com.woniuxy.controller;

import com.woniuxy.pojo.RbacManager;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/rbacManager")
public class RbacMabagerControl {


    @GetMapping("/User")
    public String findAll() {
        return "findAll";
    }

    @PostMapping("/User")
    public String addOne(@RequestBody RbacManager rbacManager) {
        return "post请求：" + rbacManager.toString();
    }

    @PutMapping("/User/{currentPage}/{pageSize}")
    public String updateOne(@RequestBody RbacManager rbacManager, @PathVariable int currentPage, @PathVariable("pageSize") int size) {
        return "put请求：" + rbacManager.toString();
    }

    @DeleteMapping("/User/{id}")
    public String deleteOne(@PathVariable int id) {
        return "删除了这个" + id + "的用户";
    }
}

